/*
 * This is a manifest file that'll be compiled into action_page.css, which will include all the files
 * listed below.
 */

.redtop {
  padding: 2em 0 0;
  h1 {
    font-size: 2.5em;
    font-weight: normal;
    line-height: 1.2;
    margin-top: 0;
  }

  a {
    color: #fff;
    text-decoration: underline;
    &:hover {
      color: #D5D5D5;
    }
  }
}
.action_page-show .redtop {
  padding-bottom: 0;
  svg.triangle {
  }
}
#progress-bar {
  .progress {
    margin-bottom: 1.2em;
  }
  .count, .goal {
    font-size: 0.85em;
  }
}

.short-description {
  font-size: 1.1em;
  margin-top: 2em;
}

#description {
  margin-top: 3em;
  h3 {
    color: #0a639b;
    line-height: 1.3;
    * { background-color: #fff; }
  }
  p, li {
    margin-bottom: 1em;
  }
}

.tools-wrapper {
  z-index: 10;
}

.form-control {
  border-radius: 0;
  padding: 0 0.5em;
  font-size: 0.8em;
}

#share-buttons-wrapper {
  position: absolute;
  text-align: center;
  right: 20px;
  top: 0px;
  @media (max-width: $screen-sm-max) and (min-width: $screen-sm-min) {
    position: relative;
    right: 0;
    #share-buttons a {
      display: inline-block !important;
    }
  }
  @media (max-width: $screen-xs-max) {
    display: none;
  }
}

#tools {

  .tool {
    background-color: #ffffff;
    margin-bottom: 20px;
    border: solid 1px #cc0000;
    border-radius: 4px;
    -webkit-box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.1); // iOS <4.3 & Android <4.1
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);

    .tool-container {
      padding: 1em 0.4em 0 0.4em;
    }

    .tool-heading {
      color: #cc0000;
      text-transform: uppercase;
      text-align: center;

      .tool-title {
        text-transform: none;
        font-size: 1.2em;
        padding: 5px 0 0 0;
        margin: 0;

        .glyphicon {
          font-size: 0.8em;
          padding-right: 0.2em;
        }
        &.signed {
          color: #14618b;
        }
      }
    }

    .tool-body {
      padding: 10px;
    }
    .tool-notice {
      padding-bottom: 5px;
    }
    .btn-default[disabled="disabled"] {
      opacity: 0.7;
    }
    .add_fields {
      font-size: 0.8em;
    }
    form {
      text-align: left;
    }
    select {
      max-width: 60%;
      margin-bottom: 0.5em;
    }
    #affiliations select {
      max-width: 100%;
    }
    .input-pair {
      margin-bottom: 0.5em;
    }
    input[type=submit].action, button[type=submit].action {
      @include speak-out-button
    }
    label.checkbox.small {
      font-size: 70%;
      font-weight: normal;
    }
    .alert.alert-danger {
      padding: 6px 15px 6px 10px;
      margin: 10px 0px 10px 0px;
    }
    .privacy-notice {
      font-size: 11px;
      padding: 5px 0;
    }
    p.step2-intro {
      font-size: 14px;
    }
    p.donate {
      text-align: center;
      margin-bottom: 20px;
    }
    fieldset {
      margin: 0.5em 0 0.8em;
      &.has-error {
        border: solid 1px #faebcc;
        background-color: #fcf8e3;
        padding: 4px;
        margin: 0.5em -5px 0.8em;
        border-radius: 4px;
      }
      &#lookup-address {
        margin: 0;
        &.has-error {
          margin-top: 1em;
        }
      }
      .help-block {
        margin-bottom: 0;
      }
      .info-circle {
        @include transition (all 0.2s ease-in-out);
        display: inline-block;
        float: right;
        border: 1px solid $red;
        text-align: center;
        border-radius: 10px;
        position: relative;
        top: -1px;
        text-transform: none;
        font-weight: normal;
        letter-spacing: 0;
        font-size: 13px;
        font-style: normal;
        padding: 0px 6px;
        line-height: 20px;
        background-color: #fff;
        color: $red;

        i {
          font-size: 14px;
          margin-right: -3px;
        }
        &.in-progress {
          color: $blue;
          border-color: #bce8f1;
          background-color: #d9edf7;
          }
        &.success {
          color: #3c763d;
          border-color: #d6e9c6;
          background-color: #dff0d8;
          }
        &.error {
          color: #a94442;
          border-color: #ebccd1;
          background-color: #f2dede;
          }
        &.warn {
          color: #8a6d3b;
          border-color: #faebcc;
          background-color: #fcf8e3;
        }
      }
    }

  }
  .progress {
    height: 41px;
  }
}

.js {
  .tool {
    .email-signup + .email-signup {
      display: none;
    }
  }
}

.victory-count {
  margin-bottom: 10px;
}
#petition-tool.unsigned .signed { display: none; }
#petition-tool.signed .unsigned { display: none; }
#petition-tool .tool-body .signed { text-align: center; }

#tools #petition-tool {
  input[type=submit] {
    margin-top: 0;
    margin-bottom: 5px;
  }
  fieldset:last-of-type {
    margin-bottom: 5px;
  }
}

.intl-toggler {
  cursor: pointer;
  font-size: 0.8em;
  margin-top: 0.6em;
}

#tools #tweet-tool {
  text-align: center;
  padding-bottom: 15px;

  .tool-body {
    padding-bottom: 0px;
  }

  .privacy-notice {
    font-size: 12px;
  }

  .newsletter-subscription {
    margin: 0 15px;

    input[type=submit] {
      margin-bottom: 0;
    }
  }

  input[type=submit] {
    margin-top: 0;
  }

  img.individual {
    display: block;
    max-width: 200px;
    margin: 0.5em auto;
    width: 73px;
    height: 73px;
  }

  .rep {
    text-align: left;
    margin-top: 0.5em;

    img {
      height: 90px;
      width: 74px;
      margin-right: 1.2em;
    }

    &.senate, &.house {
      display: none;
    }
  }

  &.senate .senate.rep,
  &.house .rep.house {
    display: block;
  }

  textarea {
    max-width: 100%;
    resize: none;
    height: 6em;
    padding: 0.6em 0.8em;
  }

  .btn-tweet {
    margin: 0em auto 1.5em;
    line-height: 19px;
    padding: 5px 10px 5px 5px;
    i {
      color: #04ADEE;
      font-size: 17px;
      position: relative;
      top: 1px;
    }
  }

  #tweet-tool-container {
    margin-top: 20px;
  }

  h3.twitter-tool-label {
    text-align: left;
    margin-top: 40px;
  }
  h3.twitter-tool-label em {
    font-size: 17px;
    color: #0A639B;
    font-style: normal;
    font-weight: normal;
    background-color: white;
    padding-right: 0.3em;
  }
  h3.twitter-tool-label::before {
    margin-bottom: -0.6em;
    border-bottom: 1px solid #eee;
    content: "";
    display: block;
  }
}

.btn-tweet {
  color: #333;
  text-decoration: none;
  background-color: #e1e8ed;
  background-image: -webkit-linear-gradient(#fff, #e1e8ed);
  background-image: -moz-linear-gradient(#fff, #e1e8ed);
  background-image: linear-gradient(#fff, #e1e8ed);
  -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";
  font-weight: bold;
}

.description img.full-width {
  max-width: 100%;
  margin-top: 15px;
  margin-bottom: 15px;
}
@media (min-width: 992px) {
  .description img.full-width {
    max-width: 109%;
  }
}
@media (min-width: 1200px) {
  .description img.full-width {
    max-width: 120%;
    margin-left: -10%;
  }
}

.description h3, h3.privacy-notice-header,
h3.header, #tools #email-tool h3, #tools #congress-message-tool h3 {
  position: relative;
  margin-bottom: 1em;
  font-weight: normal;
  text-align: left;
  font-size: 15px;

  em {
    background-color: #ffffff;
    padding-right: 0.3em;
    font-style: normal;
    position: relative;
    @media (max-width: $screen-xs-max) {
      font-size: 15px;
    }
  }
  &:before {
    content: '';
    height: 1px;
    display: block;
    border-bottom: solid 1px #eee;
    width: 100%;
    position: absolute;
    top: 8px;
  }
}

.call-script-box h3:before {
  display: none;
}

h3.privacy-notice-header {
  font-size: 15px;
  color: $blue;
  margin-top: 1em;
  span.privacy-notice-popover {
    @include transition (all 0.2s ease-in-out);
    display: inline-block;
    float: right;
    border: 1px solid #cc0000;
    height: 20px;
    width: 20px;
    text-align: center;
    border-radius: 10px;
    font-style: normal;
    line-height: 18px;
    padding-top: 0px;
    cursor: pointer;
    position: relative;
    font-weight: bold;
    background-color: #fff;
    color: #cc0000;
    &:hover {
      background-color: #cc0000;
      color: #fff;
    }
  }
}

#signatures {
  font-size: 0.7em;
  text-transform: capitalize;
  .header {
    color: #666;
    margin: 2em 0 1em;
  }
  td { border: none; }
  .timeago {
    text-align: right;
    text-transform: uppercase;
  }
  .pagination {
    float: right;
  }
}
#description .letter, #letter {
  -webkit-box-shadow: 0 0 25px 5px rgba(0, 0, 0, 0.1); // iOS <4.3 & Android <4.1
  box-shadow: 0 0 25px 5px rgba(0, 0, 0, 0.1);

  margin: 2em 0 3em;
  padding: 3em 3em 5em;
  position: relative;
  font-family: serif;
  color: #555;
  &:after {
    content: '';
    display: block;
    background-image: -webkit-linear-gradient(45deg, #74bcec 51%, white 50%, white 60%, #d95457 60%, #d95457 75%, white 75%, white 85%, #74bcec 85%, #74bcec);
    background-image: -moz-linear-gradient(45deg, #74bcec 51%, white 50%, white 60%, #d95457 60%, #d95457 75%, white 75%, white 85%, #74bcec 85%, #74bcec);
    background-image: linear, 45deg, #74bcec 51%, white 50%, white 60%, #d95457 60%, #d95457 75%, white 75%, white 85%, #74bcec 85%, #74bcec;
    background-size: 80px 80px;
    height: 0.8em;
    width: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
  }

  .body {
    line-height: normal;

    .date {
      text-align: right;
      margin-bottom: 5em;
      color: #666;
      font-size: 0.8em;
    }
    .close {
      color: #666;
    }
    .title {
      margin-bottom: 1.5em;
    }
    .description {
      margin-bottom: 2em;
    }
    .title, .description {
      font-size: 1.1em;
      font-family: serif;
    }
    .signed {
      color: #999;
      text-transform: uppercase;
      font-size: 0.85em;
      font-style: italic;
      font-weight: bold;
      letter-spacing: 0.1em;
      font-family: $sans-serif;
      margin-bottom: 1em;
    }
    .name {
      margin-bottom: 0.5em;
    }
  }
}

.vertical-share {
  line-height: 54px;
  text-align: center;
  a {
    display: block;
    margin: 0 auto 1em;
    color: #ffffff;
    max-width: 276px;

    &.twitter {
      @include transition (background-color 0.5s ease-in-out);
      background-color: #51c5f4;
    }
    &.facebook {
      @include transition (background-color 0.5s ease-in-out);
      background-color: #3f75bd;
    }
    &.google {
      @include transition (background-color 0.5s ease-in-out);
      background-color: #df5138;
    }
    div.share-label {
      text-align: center;
    }
  }

  a:hover {
    color: #fbfbfb;

    &.twitter { background-color: #28aae1 !important; }
    &.facebook { background-color: #1e4389 !important; }
    &.google { background-color: #d5492c !important; }
  }
}


@media (max-width: 768px) {
  #letter .body {
    padding: 3em 2em 4em;
  }
}

#tools #call-tool {
  padding-bottom: 0;
  .checkbox {
    margin-top: -5px;
  }
  .tool-body {
    padding-bottom: 0;
  }
  .tool-container {
    padding-bottom: 0.5em;
  }
  .form-group:last-child {
    margin-bottom: 0;
  }
  .privacy-notice {
    margin-bottom: 0px;
    text-align: center;
    margin-top: 5px;
  }
  input[type=submit], button[type=submit] {
    margin-top: 0.1em;
    margin-bottom: 0.3em;
  }
  .smalltext {
    font-size: 13px;
  }
  h3.header {
    position: relative;
    text-transform: uppercase;
    margin-bottom: 0.3em;
    margin-top: 0.4em;
    letter-spacing: 0.06em;
    color: #0a639b;
    font-size: 0.8em;
    font-weight: bold;
  }
  .call-script-box {
    padding: 6px 12px 2px 12px;
    background-color: #eee;
    margin-bottom: 1.0em;
    margin-top: 0.3em;
  }
  .call-script {
    padding: 0px;
    font-size: 14px;
  }
  .call-body-active .advisory {
    margin-bottom: 0.8em;
    line-height: 1.2;
  }
  .vertical-share p {
    line-height: 1.5;
    margin-bottom: 15px;
  }
  .form-errors {
    margin-bottom: 1rem;
  }
}

.email-tool-container, .congress-message-tool-container {
  display: none;
  input[type=submit] {
    margin-top: 0px !important;
  }
}

#tools #email-tool {
  #target-email {
    padding-bottom: 10px;
  }
  .tool-body {
    padding-top: 0;
    padding-bottom: 10px;
  }
  .tool-title {
    margin-bottom: 10px;
  }
  textarea {
    line-height: 1.3;
    font-size: 13px;
    padding: 6px;
  }
  form {
    text-align: center;
  }
  .form-group {
    margin-bottom: 7px;
  }
  .privacy-notice {
    margin-bottom: 5px;
  }
  input[type=submit] {
    margin-top: 0.1em;
    margin-bottom: 5px;
  }
  h3 {
    font-size: 17px;
    color: $blue;
    margin-top: 0;
  }
}

#tools #congress-message-tool {
  .tool-body {
    padding-top: 0;
    padding-bottom: 10px;
  }
  .tool-title {
    margin-bottom: 10px;
  }
  textarea {
    line-height: 1.3;
    font-size: 13px;
    padding: 6px;
  }
  .form-group {
    margin-bottom: 7px;
  }
  .privacy-notice {
    margin-bottom: 5px;
  }
  #customize-message {
    margin-top: 0;
    margin-bottom: 0;
  }
  input[type=submit] {
    margin-top: 0.1em;
    margin-bottom: 5px;
  }
  .progress {
    margin-top: 15px;
  }
  .congress-message-tool-container {
    margin-top: 20px;
  }
  #congressForms-common-fields div.signup-checkbox:first-child {
    display: block;
  }
  .captcha-form {
    margin-top: 10px;
    margin-bottom: 15px;
  }
  #congressForms-common-fields {
    margin-bottom: 0;
    margin-top: 4px;
  }
  .update-user-data-container .checkbox {
    line-height: 1.3;
    margin-top: 3px;
    padding-bottom: 5px;
  }
  .congressForms-captcha-image {
    max-width: 250px;
  }
  .congressForms-captcha-label {
    font-weight: normal;
    font-size: 14px;
  }
  .congressForms-legislator-fields {
    margin-bottom: 15px;
    margin-top: 15px;
    &:last-of-type {
      margin-bottom: 15px;
    }
  }
  &.congress-message-rep-lookup fieldset:last-of-type {
    margin-bottom: 0;
  }
  .rep-photo {
    padding: 0;
  }
  h3 {
    font-size: 17px;
    color: $blue;
    margin-top: 0;

    &.legislator-label {
      margin-top: 0px;
      margin-bottom: 10px;
      &.common-fields {
        margin-top: 17px;
        margin-bottom: 0;
      }
    }
    span.customize-message-popover {
      @include transition (all 0.2s ease-in-out);
      display: inline-block;
      float: right;
      border: 1px solid #cc0000;
      height: 20px;
      width: 20px;
      text-align: center;
      border-radius: 10px;
      font-style: normal;
      line-height: 18px;
      padding-top: 0px;
      cursor: pointer;
      position: relative;
      font-weight: bold;
      background-color: #fff;
      color: #cc0000;

      &:hover {
        background-color: #cc0000;
        color: #fff;
      }
    }
    span.legislator-info-popover {
      @include transition (all 0.2s ease-in-out);
      display: inline-block;
      float: right;
      border: 1px solid #cc0000;
      height: 20px;
      width: 20px;
      text-align: center;
      border-radius: 10px;
      font-style: normal;
      line-height: 18px;
      padding-top: 0px;
      cursor: pointer;
      position: relative;
      font-weight: bold;
      background-color: #fff;
      color: #cc0000;
      font-size: 12px;
      &:hover {
        background-color: #cc0000;
        color: #fff;
      }
    }
  }

  .defunct-notice {
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.5;
  }
}

.newsletter-subscription {
  input[type=submit] {
    margin-bottom: 5px;
  }

  &.submitted {
    .radio-inline, input {
      opacity: 0.5;
    }

    input[type=submit] {
      background-color: #337ab7;
    }
  }
}

// These styles only apply if you are targeting specific email addresses rather than MoC.
#target-email {
  padding-bottom: 10px;
  text-align: center;
  fieldset[disabled] textarea.form-control {
    cursor: default;
  }
  .btn-red-outline {
    margin-bottom: 15px;
  }
  i {
    margin-right: 5px;
    margin-left: 0;
  }
  i.icon-mail {
    font-size: 19px;
    position: relative;
    top: 1px;
    line-height: 19px;
  }
  i.icon-google {
    position: relative;
    top: 1px;
    margin-right: 0;
  }
  .btn-sm {
    margin-bottom: 7px;
    padding-left: 5px;
    letter-spacing: 0.03em;
  }
  .btn-red {
    font-size: 14px;
    text-transform: none;
    padding: 10px 20px;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
  }
  .small {
    padding-top: 0;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.05em;
    color: $mediumgrey;
  }
}


.mailing-list-tool {
  form {
    padding-bottom: 10px;
  }
  #subscription-form input[type=submit] {
    margin-top: 5px;
  }
}
.popover {
  font-size: 13px;
}

.popover-legislator-image {
  width: 50px;
}

[name="$ADDRESS_STATE_FULL"] { display: none; }
[name="$ADDRESS_CITY"] { display: none; }
[name="$ADDRESS_STREET"] { display: none; }
[name="$ADDRESS_ZIP5"] { display: none; }
[name="$SUBJECT"] { display: none; }
.congressForms-legislator-fields [name="$SUBJECT"] {display: block;}
[name="$MESSAGE"] { display: none; }
[name="$ADDRESS_ZIP4"] { display: none; }
[name="$ADDRESS_STATE_POSTAL_ABBREV"] { display: none; }

/* Fix for broken bootstrap-sass */

@include keyframes(progress-bar-stripes) {
  from {
    background-position: 40px 0;
  }
  to {
    background-position: 0 0;
  }
}

.progress-striped .progress-bar {
  @include background-image(linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent));
}


.action-page-list-image img {
  width: 50px;
  float: left;
  margin-right: 15px;
  margin-bottom: 15px;
}

// "All Campaigns" page

.action_page-index {
  .redtop {
    padding: 1em 0 0 0;
    .container {
      padding: 0 25px;
    }
    h1 {
      margin-bottom: 0;
    }
  }
  section.more-actions {
    background-color: #fff;
    padding-top: 100px;
    .row > div:first-child {
      border: 0;
    }
    .row > div:last-child {
      border: 0;
    }
    .row .col-sm-4 {
      margin-bottom: 100px;
    }
  }
  .pagination {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 80px;
  }
}
input[type="file"] {
  font-size: 12px;
  line-height: 1;
  margin-bottom: 10px;
}

.chosen-container {
  width: 100% !important;
}
.chosen-container-single .chosen-single {
  height: 26px;
}

@-moz-document url-prefix() {
  #tools .tool select {
    padding: 5px;
  }
}


/* Set how things appear for users without js */
html.no-js {
  .with-js {
    display: none;
  }
  .without-js {
    display: block;

    .tool-body {
      font-size: 15px;
      textarea.samplemessage {
        font-size: 12px;
        width: 100%;
        height: 140px;
        margin-bottom: 10px;
        padding: 5px;
      }
      form {
        margin-top: 20px;
      }
      h4 {
        font-size: 16px;
      }
      p {
        line-height: 1.3;
      }
    }
  }
}
html.js {
  .with-js {
    display: block;
  }
  .without-js {
    display: none;
  }
}

/* Tools div media queries */

@media (min-width: 768px) {
  #tools {
    position: fixed;
    width: 312px;
    padding-right: 25px;
    top: 100px;
  }
  .tools-wrapper.fixed {
    position: static;
  }
  .tools-wrapper.tools #tools {
    position: absolute;
    top: 97px;
  }
  .congressForms-legislator-fields .col-xs-9 {
    padding-left: 0;
    padding-right: 0;
  }
  #tools .tool select {
    max-width: auto;
  }
}

@media (min-width: 992px) {
  #tools {
    width: 390px;
    margin-left: 20px;
  }
  .congressForms-legislator-fields .col-xs-9 {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (min-width: 992px) {
  #share-buttons {
    position: absolute;
    right: -70px;

    .social-count {
      display: block;
      float: none;
      margin-bottom: 50px;
    }
  }
}

@media (min-width: 1200px) {
  .redtop .container, .action-content.container {
    padding-left: 40px;
  }
  #tools {
    width: 390px;
    margin-left: 55px;
  }
}

@media (max-width: 767px) {
  #tools {
    margin-top: 32px;
    margin-bottom: 30px;
  }
  .action-content {
    margin-bottom: 40px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  #tools .tool .tool-heading .tool-title {
    font-size: 1.35em;
  }
  #tools #tweet-tool .rep img {
    margin-right: 0.3em;
  }
  #tools #tweet-tool .privacy-notice, #tools .tool .privacy-notice {
    font-size: 9px;
    padding-bottom: 0px;
    margin-bottom: 0;
  }
  #tools #email-tool form input[type=submit] {
    font-size: 0.9em;
  }
}

.no-js .plain-date {
  display: block !important;
}

.blackflag {
  background-color: #000;
  color: #fff;
  padding: 1px 0;

  a {
    color: #fff;
    text-decoration: underline;

    &:hover {
      color: $red;
    }
  }
}
.petitions-report .description {
  max-width: 750px;
  margin: auto;
}

/**
 * Select menu autocomplete
 */
#affiliations,
#signatures {
  .select2-selection,
  .select2-dropdown {
    border-radius: 0;
    padding-left: 0.5em;
    font-size: 0.8em;
  }

}

#affiliations .select2-container {
  margin-bottom: 0.5em;
}

.select2-results__option {
  font-size: 0.8em;
  margin-bottom: 0;
}

.select2-container--bootstrap .select2-selection--single .select2-selection__arrow b {
  border-color: rgba(0, 0, 0, 0.34) transparent transparent transparent;
  border-width: 6px 3px 0 3px;
  margin-left: 3px;
}

// Greyed-out placeholder text
html.js #affiliations {
  select option {
    color: rgb(85, 85, 85);
  }

  select option:first-child {
    color: #aaa;
  }
  select.empty {
    color: #aaa;
  }
}

/**
 * Signatures by institution
 */
#signatures-filter {
  font-size: 17px;
  text-transform: none;

  #institution-select-container {
    width: 70%;
    float: left;
    padding-top: 2px;
  }

  input[type=submit] {
    @include speak-out-button;
    float: right;
    width: 26%;
    font-size: 0.7em;
    margin: 0;
  }
}

#signatures {
  .affiliation-line {
    margin-left: 10px;
  }
}

#signatures.affiliation-signatures {

  .header {
    color: $red;
  }

  .content {
    border: 1px solid $lightgrey;
    padding: 15px;

    table {
      margin-top: 25px;
    }

    .name {
      margin-bottom: 2px;
    }
  }
}
